<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2021/10/13
  Time: 8:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/login.css"/>
    <script src="js/function.js"></script>
    <script src="js/jquery-1.12.4.min.js"></script>

    <style>
        .reg form p .error {
            display: inline-block;
            border: 3px solid crimson;
            background-color: rgba(220, 20, 123, 0.1);

            margin-left: 20px;
        }

        .error {
            display: inline-block;
            border: 3px solid crimson;
            background-color: rgba(220, 20, 123, 0.1);

            margin-left: 20px;
        }

    </style>
</head>
<body><!-------------------reg-------------------------->

<div class="reg">
    <%--    通过JS文件中的checkForm方法验证注册信息是否有效，onsubmit属性若为真则提交按钮有效，否则无效。--%>
    <form action="userEnroll" method="post" onsubmit="return checkForm(this)"><h1><a href="index.html"><img
            src="img/temp/logo.png"></a></h1>
        <h1 style="align-content: center; background-color: rgba(0,0,200,0.5);text-align: center">
            <p>用户注册</p>
        </h1>
        <p><input type="text" name="userID" value="" placeholder="请输入ID" onfocus="FocusItem(this)"
                  onblur="CheckItem(this)"><span class="error">ID不能为空!</span></p>
        <p><input type="text" name="userName" value="" placeholder="请输入姓名" onfocus="FocusItem(this)"
                  onblur="CheckItem(this)"><span class="error">用户名不能为空!</span></p>
        <p><input type="text" name="userPassword" value="" placeholder="请输入密码" onfocus="FocusItem(this)"
                  onblur="CheckItem(this)"><span class="error">密码不能为空!</span></p>
        <p><input type="text" name="userPasswordRe" value="" placeholder="请确认密码" onfocus="FocusItem(this)"
                  onblur="CheckItem(this)"><span class="error">确认密码不能为空!</span></p>
        <p>请确认性别：
            <input style="height: 15px; width: 15px;" type="radio" name="userSex" size="50" value="M" checked="checked">男
            <input style="height: 15px;width: 15px;" type="radio" name="userSex" size="50" value="W">女
        </p>
        <p><input type="text" name="userAddress" value="" placeholder="请确认收货地址"></p>
        <p>请输入生日:<input type="date" name="userBirthday" value=""></p>
        <p><input type="text" name="userEmail" value="" placeholder="请输入邮箱号"></p>
        <p><input type="text" name="userPhone" value="" placeholder="请输入手机号"></p>

        <%--        validationCode should equals of session.randomCode--%>
        <input type="text" name="validationCode" id="validationCode" placeholder="请输入验证码" lay-verify="required"
               onfocus="FocusItem(this)"
               onblur="CheckItem(this)">
        <img src="validate.jsp" id="validationCode_img" alt="看不清?换一个" onclick="loadImage();return false;"
             name="validationCode_img" align="middle"><span class="error">验证码不能为空!</span>
        <script>
            function loadImage() {
                document.getElementById("validationCode_img").src = "validate.jsp?time=" + new Date().getTime();
            }</script>

        <p><input type="submit" name="" value="注册"></p>
        <p class="txtL txt">完成此注册，即表明您同意了我们的<a href="#">
            <使用条款和隐私策略>
        </a></p>
        <p class="txt"><a href="#"><span></span>已有账号登录</a></p>
        <!--<a href="#" class="off"><img src="img/temp/off.png"></a>--></form>

</div>
</body>

</html>
